package com.spring.ext.demos.ext.event;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 接口进行监听
 */
@Component
public class MyApplicationListener implements ApplicationListener<MyEvent> {


    @Override
    public void onApplicationEvent(MyEvent event) {
        String myEvent = event.getMyEvent();

    }
}
